import java.util.Scanner;

public class IfTest {
    static public void main(String [] args) {
        // java.util.Scanner sc = new java.util.Scanner(System.in);
        Scanner sc = new Scanner(System.in);
        int a = 0, count = 0;


        // while (a != -1) {
        while (count < 10) {
            System.out.println(Math.random());
            System.out.printf("请输入分数(0 - 100, -1为退出): ");
            a = sc.nextInt();

            if (a == -1) {
                break;
            }

            if (a == 50) {
                System.out.printf("考的太好了!\n");
                continue;
            }

            if (a > 100 || a < 0) {
                System.out.printf("输出大于100的分数不合法!\n");
            // } else if (a < 0) {
                // System.out.printf("输出小于0的分数不合法!\n");
            } else if (a > 90) {
                System.out.printf("此分数为A等级!\n");
            } else if (a > 80) {
                System.out.printf("此分数为B等级!\n");
            } else if (a > 70) {
                System.out.printf("此分数为C等级!\n");
            } else {
                System.out.printf("此分数为D等级!\n");
            }

            ++count;  //count = count + 1
        }
    }
}
